package com.shopnight.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 商户信息表
 * @TableName takeout_merchant
 */
@TableName(value ="takeout_merchant")
@Data
public class TakeoutMerchant implements Serializable {
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 组织id
     */
    private Integer orgId;

    /**
     * 商户名称
     */
    private String name;

    /**
     * 联系电话
     */
    private String mobile;

    /**
     * 负责人
     */
    private String principalName;

    /**
     * 营业时间(开始时间）
     */
    private Date startHours;

    /**
     * 营业时间(结束时间)
     */
    private Date endHours;

    /**
     * 所属省份（000001）
     */
    private String province;

    /**
     * 所属市（000001001）
     */
    private String city;

    /**
     * 所属区（000001001001）
     */
    private String area;

    /**
     * 详细地址
     */
    private String address;

    /**
     * 门店Logo（图片url，单张）
     */
    private String logo;

    /**
     * 商家相册图
     */
    private String photoImage;

    /**
     * 身份证正面照
     */
    private String idCardFrontImage;

    /**
     * 身份证反面照
     */
    private String idCardBackImage;

    /**
     * 营业执照（图片上传）
     */
    private String businessLicense;

    /**
     * 审核状态（0：未审核，1：通过；2：不通过）
     */
    private Integer state;

    /**
     * 是否有效 [0->无效 1->有效]
     */
    private Integer isValid;

    /**
     * 经度
     */
    private Double longitude;

    /**
     * 纬度
     */
    private Double latitude;

    /**
     * 描述
     */
    private String description;

    /**
     * 起送价格
     */
    private BigDecimal minDistributionPrice;

    /**
     * 登陆账号
     */
    private String loginAccount;

    /**
     * 密码
     */
    private String password;

    /**
     * 数据入库时间
     */
    private Date insertTime;

    /**
     * 数据最后一次更新时间
     */
    private Date updateTime;

    /**
     * 删除时间
     */
    private Date deleteTime;

    /**
     * 是否已删除（0删除，1正常）
     */
    private Integer beenDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TakeoutMerchant other = (TakeoutMerchant) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
            && (this.getPrincipalName() == null ? other.getPrincipalName() == null : this.getPrincipalName().equals(other.getPrincipalName()))
            && (this.getStartHours() == null ? other.getStartHours() == null : this.getStartHours().equals(other.getStartHours()))
            && (this.getEndHours() == null ? other.getEndHours() == null : this.getEndHours().equals(other.getEndHours()))
            && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getArea() == null ? other.getArea() == null : this.getArea().equals(other.getArea()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getLogo() == null ? other.getLogo() == null : this.getLogo().equals(other.getLogo()))
            && (this.getPhotoImage() == null ? other.getPhotoImage() == null : this.getPhotoImage().equals(other.getPhotoImage()))
            && (this.getIdCardFrontImage() == null ? other.getIdCardFrontImage() == null : this.getIdCardFrontImage().equals(other.getIdCardFrontImage()))
            && (this.getIdCardBackImage() == null ? other.getIdCardBackImage() == null : this.getIdCardBackImage().equals(other.getIdCardBackImage()))
            && (this.getBusinessLicense() == null ? other.getBusinessLicense() == null : this.getBusinessLicense().equals(other.getBusinessLicense()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getIsValid() == null ? other.getIsValid() == null : this.getIsValid().equals(other.getIsValid()))
            && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
            && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getMinDistributionPrice() == null ? other.getMinDistributionPrice() == null : this.getMinDistributionPrice().equals(other.getMinDistributionPrice()))
            && (this.getLoginAccount() == null ? other.getLoginAccount() == null : this.getLoginAccount().equals(other.getLoginAccount()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getInsertTime() == null ? other.getInsertTime() == null : this.getInsertTime().equals(other.getInsertTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleteTime() == null ? other.getDeleteTime() == null : this.getDeleteTime().equals(other.getDeleteTime()))
            && (this.getBeenDeleted() == null ? other.getBeenDeleted() == null : this.getBeenDeleted().equals(other.getBeenDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
        result = prime * result + ((getPrincipalName() == null) ? 0 : getPrincipalName().hashCode());
        result = prime * result + ((getStartHours() == null) ? 0 : getStartHours().hashCode());
        result = prime * result + ((getEndHours() == null) ? 0 : getEndHours().hashCode());
        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getArea() == null) ? 0 : getArea().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getLogo() == null) ? 0 : getLogo().hashCode());
        result = prime * result + ((getPhotoImage() == null) ? 0 : getPhotoImage().hashCode());
        result = prime * result + ((getIdCardFrontImage() == null) ? 0 : getIdCardFrontImage().hashCode());
        result = prime * result + ((getIdCardBackImage() == null) ? 0 : getIdCardBackImage().hashCode());
        result = prime * result + ((getBusinessLicense() == null) ? 0 : getBusinessLicense().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getIsValid() == null) ? 0 : getIsValid().hashCode());
        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getMinDistributionPrice() == null) ? 0 : getMinDistributionPrice().hashCode());
        result = prime * result + ((getLoginAccount() == null) ? 0 : getLoginAccount().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getInsertTime() == null) ? 0 : getInsertTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleteTime() == null) ? 0 : getDeleteTime().hashCode());
        result = prime * result + ((getBeenDeleted() == null) ? 0 : getBeenDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orgId=").append(orgId);
        sb.append(", name=").append(name);
        sb.append(", mobile=").append(mobile);
        sb.append(", principalName=").append(principalName);
        sb.append(", startHours=").append(startHours);
        sb.append(", endHours=").append(endHours);
        sb.append(", province=").append(province);
        sb.append(", city=").append(city);
        sb.append(", area=").append(area);
        sb.append(", address=").append(address);
        sb.append(", logo=").append(logo);
        sb.append(", photoImage=").append(photoImage);
        sb.append(", idCardFrontImage=").append(idCardFrontImage);
        sb.append(", idCardBackImage=").append(idCardBackImage);
        sb.append(", businessLicense=").append(businessLicense);
        sb.append(", state=").append(state);
        sb.append(", isValid=").append(isValid);
        sb.append(", longitude=").append(longitude);
        sb.append(", latitude=").append(latitude);
        sb.append(", description=").append(description);
        sb.append(", minDistributionPrice=").append(minDistributionPrice);
        sb.append(", loginAccount=").append(loginAccount);
        sb.append(", password=").append(password);
        sb.append(", insertTime=").append(insertTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", deleteTime=").append(deleteTime);
        sb.append(", beenDeleted=").append(beenDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}